Optimal. Leaf size=56 \[ -\frac{d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}+b c^2 d \log (x)-b c^2 d \log (1-c x)-\frac{b c d}{2 x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0540103, antiderivative size = 56, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {37, 5936, 12, 77} \[ -\frac{d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}+b c^2 d \log (x)-b c^2 d \log (1-c x)-\frac{b c d}{2 x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 5936
Rule 12
Rule 77
Rubi steps
\begin{align*} \int \frac{(d+c d x) \left (a+b \tanh ^{-1}(c x)\right )}{x^3} \, dx &=-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}-(b c) \int \frac{d (-1-c x)}{2 x^2 (1-c x)} \, dx\\ &=-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}-\frac{1}{2} (b c d) \int \frac{-1-c x}{x^2 (1-c x)} \, dx\\ &=-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}-\frac{1}{2} (b c d) \int \left (-\frac{1}{x^2}-\frac{2 c}{x}+\frac{2 c^2}{-1+c x}\right ) \, dx\\ &=-\frac{b c d}{2 x}-\frac{d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 x^2}+b c^2 d \log (x)-b c^2 d \log (1-c x)\\ \end{align*}
Mathematica [A] time = 0.0603059, size = 76, normalized size = 1.36 \[ -\frac{d \left (4 a c x+2 a-4 b c^2 x^2 \log (x)+3 b c^2 x^2 \log (1-c x)+b c^2 x^2 \log (c x+1)+2 b c x+2 (2 b c x+b) \tanh ^{-1}(c x)\right )}{4 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 84, normalized size = 1.5 \begin{align*} -{\frac{cda}{x}}-{\frac{da}{2\,{x}^{2}}}-{\frac{cdb{\it Artanh} \left ( cx \right ) }{x}}-{\frac{db{\it Artanh} \left ( cx \right ) }{2\,{x}^{2}}}-{\frac{3\,{c}^{2}db\ln \left ( cx-1 \right ) }{4}}+{c}^{2}db\ln \left ( cx \right ) -{\frac{cdb}{2\,x}}-{\frac{{c}^{2}db\ln \left ( cx+1 \right ) }{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.957128, size = 120, normalized size = 2.14 \begin{align*} -\frac{1}{2} \,{\left (c{\left (\log \left (c^{2} x^{2} - 1\right ) - \log \left (x^{2}\right )\right )} + \frac{2 \, \operatorname{artanh}\left (c x\right )}{x}\right )} b c d + \frac{1}{4} \,{\left ({\left (c \log \left (c x + 1\right ) - c \log \left (c x - 1\right ) - \frac{2}{x}\right )} c - \frac{2 \, \operatorname{artanh}\left (c x\right )}{x^{2}}\right )} b d - \frac{a c d}{x} - \frac{a d}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.03806, size = 220, normalized size = 3.93 \begin{align*} -\frac{b c^{2} d x^{2} \log \left (c x + 1\right ) + 3 \, b c^{2} d x^{2} \log \left (c x - 1\right ) - 4 \, b c^{2} d x^{2} \log \left (x\right ) + 2 \,{\left (2 \, a + b\right )} c d x + 2 \, a d +{\left (2 \, b c d x + b d\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{4 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.1712, size = 95, normalized size = 1.7 \begin{align*} \begin{cases} - \frac{a c d}{x} - \frac{a d}{2 x^{2}} + b c^{2} d \log{\left (x \right )} - b c^{2} d \log{\left (x - \frac{1}{c} \right )} - \frac{b c^{2} d \operatorname{atanh}{\left (c x \right )}}{2} - \frac{b c d \operatorname{atanh}{\left (c x \right )}}{x} - \frac{b c d}{2 x} - \frac{b d \operatorname{atanh}{\left (c x \right )}}{2 x^{2}} & \text{for}\: c \neq 0 \\- \frac{a d}{2 x^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1892, size = 115, normalized size = 2.05 \begin{align*} -\frac{1}{4} \, b c^{2} d \log \left (c x + 1\right ) - \frac{3}{4} \, b c^{2} d \log \left (c x - 1\right ) + b c^{2} d \log \left (x\right ) - \frac{{\left (2 \, b c d x + b d\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{4 \, x^{2}} - \frac{2 \, a c d x + b c d x + a d}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]